package d1_com.itheima.thread;
import java.util.concurrent.FutureTask;

public class Test3 {
    public static void main(String[] args) throws Exception, InterruptedException {
        MyCallable call = new MyCallable(100);
        //任务对象
        FutureTask<String> f1 = new FutureTask<>(call);
        new Thread(f1).start();
        //获取线程执行完毕后返回结果
        String s = f1.get();
        System.out.println(s);

        //Thread常用方法



    }
}
